// 导航栏菜单打开逻辑
(function() {
	var headerNotify = document.querySelector('div.header__notify');
	var headerNotifyCation = document.querySelector('.header__notifycation--show');
	var avatar = document.querySelector('.header__avatarcontainer');
	var accountNavitem = document.querySelector('.header__navitem--account');
	// 打开消息菜单处理器
	function showHeaderNotifyCation() {
		event.stopPropagation();
		hideHandler();
		headerNotifyCation.style = "";
		window.addEventListener('click', hideHandler);
	}
	// 打开账户菜单处理器
	function showAccountNavitem() {
		event.stopPropagation();
		hideHandler();
		accountNavitem.style = "";
		window.addEventListener('click', hideHandler);
	}
	// 关闭菜单处理器
	function hideHandler() {
		headerNotifyCation.style = "display:none";
		accountNavitem.style = "display:none";
		window.removeEventListener('click', hideHandler);
	}
	headerNotify.addEventListener('click', showHeaderNotifyCation);
	avatar.addEventListener('click', showAccountNavitem);
})();
